-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: improve scroll syncing #21622
feat: improve scroll syncing #21622
Conversation
Size Change: +2 B (0%) Total Size: 1.01 MB ℹ️ View Unchanged
|
@@ -161,12 +159,12 @@ export function PlayerInspectorList(): JSX.Element { | |||
.getElementById('PlayerInspectorListMarker') | |||
?.setAttribute('style', `transform: translateY(${offset}px)`) | |||
|
|||
if (!syncScrollingPaused && syncScroll) { | |||
if (!syncScrollPaused) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should syncSrollPaused and listRef be dependencies of the useEffect?
(more a "teach me" question than anything else :)
if (listRef.current) { | ||
listRef.current.scrollToRow(playbackIndicatorIndex) | ||
} | ||
// Tricky: Need to dely to make sure the row scrolled has finished |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Tricky: Need to dely to make sure the row scrolled has finished | |
// Tricky: Need to delay to make sure the row scrolled has finished |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Problem
Before we had some complicated logic around when the scroll was synced
Towards #21302
Changes